package com.wiki.gds.base.web.controller.config.feign;

import com.wiki.gds.base.web.controller.support.HttpKit;
import feign.RequestInterceptor;
import feign.RequestTemplate;

/**
 * Feign请求拦截器
 * @author WIKI
 * @create 2017-11-10 17:25
 **/
public class FeignBasicAuthRequestInterceptor  implements RequestInterceptor {


    public FeignBasicAuthRequestInterceptor() {

    }

    @Override
    public void apply(RequestTemplate template) {
        String header=  HttpKit.getRequest().getHeader("Authorization");
        template.header("Authorization",header);
    }
}
